package gui.editor;

import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.util.Assert;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IPersistableElement;

public class PrivateChatEditorInput implements IEditorInput {
	private String whispedAvatarName;

	public PrivateChatEditorInput(String participant) {
		super();
		Assert.isNotNull(participant);
		this.whispedAvatarName = participant;
	}

	public boolean exists() {
		return false;
	}

	public String getToolTipText() {
		return whispedAvatarName;
	}

	public ImageDescriptor getImageDescriptor() {
		return null;
	}

	public String getName() {
		return whispedAvatarName;
	}

	public IPersistableElement getPersistable() {
		return null;
	}

	public boolean equals(Object obj) {
		if (super.equals(obj))
			return true;
		if (!(obj instanceof PrivateChatEditorInput))
			return false;
		PrivateChatEditorInput other = (PrivateChatEditorInput) obj;
		return whispedAvatarName.equals(other.whispedAvatarName);
	}

	public int hashCode() {
		return whispedAvatarName.hashCode();
	}

	public Object getAdapter(Class adapter) {
		// TODO Auto-generated method stub
		return null;
	}
}